#ifndef SOCKETSYNC_P_H
#define SOCKETSYNC_P_H

#include<QObject>

class QUdpSocket;

class SocketSyncPrivate: public QObject
{

    Q_OBJECT
public:
    SocketSyncPrivate(QObject *parent = 0);
    ~SocketSyncPrivate();

    void setUdpPort(quint16 port = 0);

    //0 接收成功，结果存在 result 中
    //-1 发送失败
    //-2 接收超时
    int sendUdpMessage(QString msg, QString ip, quint16 port, QString &result);

    QUdpSocket* udpsocket() {return m_udpsocket;}

    QUdpSocket *m_udpsocket;
};

#endif // SOCKETSYNC_P_H
